module.exports = {
	getUserInfo() {
		return new Promise((resolve, reject) => {
			let user = {
				"uid": 27638,
				"easemob": "BaqewvQBPzklXSKw",
				"username": "苦丁哈哈哈2",
				"avatar": "https://qiance.qianfanyun.com/qianfan-qianfanyun_27638.jpg?imageView2/1/w/400/h/400",
				"phone": "13222592150",
				"bearerToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9xaWFuZmFuMS5xaWFuZmFuYXBpLmNvbSIsImF1ZCI6Imh0dHA6XC9cL3FpYW5mYW4xLnFpYW5mYW5hcGkuY29tIiwiaWF0IjoxNjU4OTkyMjc0LCJleHAiOjE2NjE1ODQyNzQsIm5iZiI6MTY1ODk5MjI3NCwidWlkIjoyNzYzOCwidXNlcm5hbWUiOiJcdTgyZTZcdTRlMDFcdTU0YzhcdTU0YzhcdTU0YzgyIiwiYXZhdGFyIjoiaHR0cHM6XC9cL3FpYW5jZS5xaWFuZmFueXVuLmNvbVwvcWlhbmZhbi1xaWFuZmFueXVuXzI3NjM4LmpwZz9pbWFnZVZpZXcyXC8xXC93XC80MDBcL2hcLzQwMCIsImRldmljZSI6IiIsImp0aSI6Mjc2Mzh9.G5jeQ8OzrhS80Zmna88jRMy0_F__3Ai2Gogakg2cUOQ",
				"info": {
					"is_vip": 0,
					"tags": {
						"is_join_meet": 0,
						"groups": [{"text": "主播", "bgcolor": "#ffa974"}],
					},
				},
				"openId": "oUSsg5Yvsqx0CNvTN_b7zajU8pwk",
				"unionId":"oIPOYv5E5CYfgAE06Va_eP3BUQC8"
			}
			console.log('wx', wx.getSystemInfo())
			// resolve(false) //未登录
			// wx.login({
			// 	success(res) {
			// console.log("code is : ", res.code);
			resolve(user)
			// 	}
			// })
			//已登录
		})
	},
	getSiteInfo() {
		return new Promise((resolve) => {
			resolve({
				request_host: "http://qianfan1.qianfanapi.com",
				reverse_proxy_domain: "https://applets.qianfanapi.com/to/qianfan1.newh5.qianfanyun.com"
			})
		})
	},
	getMiniprogramPage(type) {
		let pages = {
			'login': '/pages/index/index'
		}
		return pages[type]
	}
}
